﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Category.ascx.cs" Inherits="module_Category" %>

<%
    CategoryBusiness c = new CategoryBusiness();
    PanelBusiness p = new PanelBusiness();
    PanelesEntities entity = p.getItem(ID);
    int chanel_id = Helper.getQuery("cid");
    if (chanel_id == 0) { chanel_id = entity._channelID; }
    if (Display_Container.Trim().Equals("True") || Display_Container.Trim().Equals("1"))
    {
        Response.Write("<div id=\"caption\">"+entity._name+"</div>");
    }
    ArrayList items = c.getCategoryView();
    if (items != null)
    {
        CategoriesEntities item = null;
        Response.Write("<div class=\"category\"><table>");
        for (int i = 0; i < items.Count; i++)
        {
            item = (CategoriesEntities)items[i];
            Response.Write("<tr><td><a href=\"Default.aspx?url=module/Cate.ascx&cid=" + chanel_id.ToString() + "&cate="+item._id+"\">");
            Response.Write(item._name + "</a></td></tr>");
        }
        Response.Write("</table></div>");
    }
     %>